// testlexer.cs
using System;
using System.IO;
using System.Text;
using Tools;

public class testlexer {
public static void Main(string[] argv){
	Lexer lexer = new tokens();
//	lexer.m_debug = true;
	TOKEN tok;
	string fname = "eof1.txt";
	if (argv.Length>0)
		fname = argv[0];
	lexer.Start(new StreamReader(fname,new ASCIIEncoding(),true,1024));
	while ((tok = lexer.Next())!=null) {
	    Console.Write(lexer.Saypos(tok.pos));
		Console.WriteLine(" {0} {1}", tok.yyname(), tok.yytext);
	}
}}
